load("scripts/test/test.js");
load("scripts/test/both/config.js");
load("scripts/lib/panda/jquery.js");
load("scripts/lib/panda/tmpl.js");
load("scripts/lib/panda/render.js");
load("webapp/js/both/views.js");

test ({
	name: function() {
		return "Test Views";
	},
	testIndex: function() {
		var users = [
			{ name: "user1", desc: "desc1" },
			{ name: "user2", desc: "desc2" }
		];

		var ret = panda.render("index", function($){
			views.index($, users);
		});

		print(ret);
		Assert.assertTrue(ret.indexOf("user1") >= 0);
		Assert.assertTrue(ret.indexOf("desc1") >= 0);
		Assert.assertTrue(ret.indexOf("user2") >= 0);
		Assert.assertTrue(ret.indexOf("desc2") >= 0);
	}
});
